<?php
namespace app\mobile\model;

/**
 * Class ShopGoodsCombo
 * @package app\mobile\model     店铺商品套餐表
 */
class ShopGoodsCombo extends BaseModel
{
    /*
     * 套餐和套餐选中的商品一对多
     */
    public function shopGoodsComboSelected()
    {
        return $this->hasMany('ShopGoodsComboSelected','combo_id','id');
    }
    /*
     * 套餐和店铺多对一
     */
    public function shop()
    {
        return $this->hasMany('Shop','member_id','shop_id')->field('member_id,title');
    }
}